//手机验证 正则表达式
const phoneRegex = /^1[3-9]\d{9}$/;

//验证手机号
const phone = "13800138000";
const isValid = phoneRegex.test(phone);
console.log(isValid);

//验证邮箱
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;

//验证邮箱
const email = "test@example.com";
const isValidEmail = emailRegex.test(email);
console.log(isValidEmail);

//验证密码
const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$/;

//验证密码
const password = "Abc12345";
const isValidPassword = passwordRegex.test(password);
console.log(isValidPassword);


